<?php


namespace app\api\model\user;


use think\Model;

class BusinessMoneyRecord extends Model
{
    protected $name = 'business_money_record';
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';

    public function getTypeAttr($value)
    {
        $type = ['income'=>'入账','expend'=>'出账'];
        return $type[$value];
    }
    public function getRecordTypeAttr($value)
    {
        $type = ['extract'=>'提现','transfer'=>'转账','consume income'=>'消费入账'];
        return $type[$value];
    }
}